<?php
//接收curl请求的服务器
echo "<pre>";
echo "请求成功!\n";
echo "请求方式:".$_SERVER["REQUEST_METHOD"]."\n";
if($_SERVER["REQUEST_METHOD"]==="POST"){
    echo "内容类型:".$_SERVER["CONTENT_TYPE"]."\n";
    if($_SERVER["CONTENT_TYPE"]==="application/json"){
        echo "原始数据:".file_get_contents('php://input')."\n";
    }
    else{
        echo "POST数据:\n";
        print_r($_POST);
    }
}
echo "超全局变量:\n";
print_r($GLOBALS);
echo "</pre>";
